home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-01-11 | 2.4 KB | 84 lines | [TEXT/CWIE] |
- // DataPersistence.h
-
- #ifndef __DATAPERSISTENCE_
- #define __DATAPERSISTENCE_
-
- #ifdef OWNER
- #define SCOPE
- #define INIT(x) =x
- #else
- #define SCOPE extern
- #define INIT(x)
- #endif
-
-
- ///©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
- // PUBLIC
- ///©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
-
- ///≈≈≈≈≈≈≈≈≈≈≈≈ Public data ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
-
- // Customizable
-
- #define kDefaultPersistenceRezType 'PERS' // change if you like
-
- #define kNoNewType '????' // special value, don't change
- // to see why, => SWGOpenPersistenceFileConditionally()
-
- SCOPE Str63 gPersistenceFileName INIT("\pData Persistence"); // change if you like
-
- // Not intended for customization
-
- #define kDataSizeBiggerError -6000
- #define kDataSizeSmallerError -6001
-
- ///≈≈≈≈≈≈≈≈≈≈≈≈ Public prototypes ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
-
- // Customizable
-
- void SWGErrorReportingStub (OSErr err);
-
- // Not intended for customization (but you never know :)
-
- OSErr SWGOpenPersistenceFile (void);
- void SWGClosePersistenceFile (void);
- Boolean SWGOpenPersistenceFileConditionally (OSType newType);
-
- OSErr SWGSaveRecord (Ptr recordP, Size recSize, SInt16 resourceID);
- #define SWGSaveString SWGSaveRecord // for symmetry with SWGLoadString
-
- OSErr SWGLoadRecord (Ptr recordP, Size recSize, SInt16 resourceID);
- OSErr SWGLoadString (Ptr stringP, Size maxStringSize, SInt16 resourceID);
-
-
- ///©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
- // PRIVATE
- ///©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
-
- #ifdef OWNER
-
- ///≈≈≈≈≈≈≈≈≈≈≈≈ Private data ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
-
- OSType gSWGPersistenceResourceType = kDefaultPersistenceRezType;
-
- Boolean gSWGPersistenceFileIsOpen = false;
- Boolean gSWGPersistenceUsesAppFork = false;
- SInt16 gSWGPreviousResFile = -1;
- SInt16 gSWGPersistenceResFile = -1;
-
-
- ///≈≈≈≈≈≈≈≈≈≈≈≈ Private prototypes ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
-
- void _SWGOverrideResourceType (OSType newType);
- void _SWGRestoreResourceType (void);
-
-
- #endif // OWNER
-
- #undef SCOPE
- #undef INIT
-
- #endif // __DATAPERSISTENCE_
-
- // end
-